package org.socialgr.impl.domain;

import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Set;
import java.util.Vector;

public class Contenedor extends Vector implements Set{

	private Vector<Object> container;
	/**
	 * @param args
	 */
	
	public Contenedor(){
		super();
		this.container = new Vector<>();
	}
	
	@Override
	public int size() {
		return container.size();
	}

	@Override
	public boolean isEmpty() {
		return this.size() == 0;
	}

	@Override
	public boolean contains(Object o) {
		return (container.contains(o));
	}

	@Override
	public Iterator iterator() {
		return container.iterator();
	}

	@Override
	public Object[] toArray() {
		Object[] array;
		array = container.toArray();
		return null;
	}

	@Override
	public Object[] toArray(Object[] a) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public boolean add(Object e) {
		if (!this.contains(e))
			return container.add(e);
		return false;
	}

	@Override
	public boolean remove(Object o) {
		return container.remove(o);
	}

	@Override
	public boolean containsAll(Collection c) {
		return container.containsAll(c);
	}

	@Override
	public boolean addAll(Collection c) {
		for(Object obj:c)
			this.add(obj);
		return true;
	}

	@Override
	public boolean retainAll(Collection c) {
		return container.retainAll(c);
	}

	@Override
	public boolean removeAll(Collection c) {
		return container.removeAll(c);
	}

	@Override
	public void clear() {
		container.clear();
	}
}
